1. Field of the Invention
The present invention relates to a computer program product, system, and method for maintaining inactive copy relationships for secondary storages of active copy relationships having a common primary storage for use in case of a failure of the common primary storage.
2. Description of the Related Art
In a storage environment, a storage controller may maintain mirror copy relationships, where a primary volume in a mirror copy relationship comprises the storage or volumes from which data is physically copied to a secondary or volume. Failover programs, such as International Business Machine Corporation's (“IBM”) HyperSwap® which is a function in the z/OS® operating system, provides continuous availability for disk failures by maintaining the mirror copy relationships to provide synchronous copies of all primary disk volumes on one or more primary storage systems to one or more target (or secondary) storage systems. (HyperSwap is a registered trademark of IBM in countries throughout the world). When a disk failure is detected, code in the operating system identifies HyperSwap managed volumes and instead of failing the I/O request, HyperSwap switches (or swaps) information in internal control blocks so that the I/O request is driven against the secondary volume of the mirror copy relationship. Since the secondary volume is an identical copy of the primary volume prior to the failure, the I/O request will succeed with no impact to the program issuing the I/O request, which could be an application program or part of the operating system. This therefore masks the disk failure from the program and avoids an application and/or system outage.
A mirror copy relationship may maintain a current and previous bitmaps to keep track of updates at the primary volume that need to be copied or synchronized to the secondary storage. A previous bitmap, also known as an out-of-synch bitmap, indicates updated data in the primary volume that occurred in a previous interval, or consistency period, and a current bitmap, also known as a change recording bitmap, which indicates updated data in the primary volume that occurred in the current interval or current consistency period. After the replication manager copies all updated data indicated in the previous bitmap, the bitmaps would be toggled to create a new interval, so that the previous bitmap is set to the current bitmap to copy all updated data prior to the new interval, and a new current bitmap would be initialized to record writes in the new interval. In this way, updates that occur while data is being synchronized get recorded without interfering with the synchronization of the writes as of the recent interval.